home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / E-G / Externals.cpt / Externals / card_4766.txt < prev    next >
Text File  |  1989-02-26  |  1KB  |  51 lines

  1. -- card: 4766 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2795
  5. -- name: ChangeMenu
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=315 top=307 right=329 bottom=379
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Demo
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   push this card
  23.   visual effect iris open
  24.   go to card id 10546
  25. end mouseUp
  26.  
  27.  
  28.  
  29. -- part contents for background part 20
  30. ----- text -----
  31. 3
  32.  
  33. -- part contents for background part 1
  34. ----- text -----
  35. XCMD
  36.  
  37. -- part contents for background part 22
  38. ----- text -----
  39. ChangeMenu menuNumber, itemNumber, "Item"
  40.  
  41. -- part contents for background part 13
  42. ----- text -----
  43. ChangeMenu is an XCMD that lets you change the names of items in menus you've created using the NewMenu XFCN.  For example:
  44.  
  45.   ChangeMenu myMenu, 2, "Go to Address"
  46.  
  47. Will change the second menu item in menu "myMenu" to read "Go To Address".  If the original item was disabled or checked, the changed item will be also.  
  48.  
  49. You can not change the title of a menu, only the items in the meu itself.
  50.  
  51. The menu number you provide to to ChangeMenu should be the same number that was returned by NewMenu.